<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var day=prompt('请输入天数');
        day=Number(day);
        day=parseInt(day);
        if(day<=31&&day>=1){
            if(day%7==0){
                console.log('今天是星期天');
            }else if(day%7==1){
                console.log('今天是星期一');

            }else if(day%7==2){
                console.log('今天是星期二');
            }else if(day%7==3){
                console.log('今天是星期三');
            }else if(day%7==4){
                console.log('今天是星期四');

            }else if(day%7==5){
                console.log('今天是星期五');
            }else if(day%7==6){
                console.log('今天是星期六');
            }
        }else{
                alert('请输入正确的天数');
            }
    </script>
</body>
</html>